home *** CD-ROM | disk | FTP | other *** search
- Path: news1.interserv.net!news
- From: bitsafe@execpc.com
- Newsgroups: comp.lang.c++
- Subject: Plugins/cgi advice needed
- Date: Wed, 03 Apr 1996 17:58:51 GMT
- Organization: InterServ News Service
- Message-ID: <4ju7b0$dma@lal.interserv.net>
- NNTP-Posting-Host: doa99205.doa.state.wi.us
- X-Newsreader: Forte Free Agent 1.0.82
-
- I have a web question that maybe some web master can solve. Here's the
- senario ...
-
- A web server serves up a web page to a browser. The page contains data
- on
- activities that the user had previously started, but not completed. In
- the
- meantime the user has created a file *on their machine* that contains
- the data
- needed to complete the activity.
-
- The user presses a button or hypertext link on the web page to select
- which
- activity they wants to complete. At that point *the browser* needs to
- fetch the
- contents of the correct file and send it to the server along with data
- on which
- activity is being completed.
-
- Cgi scripts are programs on a server machine. They have no access to
- the files
- on a browser's machine, so cgi won't do.
-
- The only two ways of extending the capability of the browser appear to
- be helper
- apps and plugins. I don't think helper apps can transmit data back to
- a browser
- so that it can be forwarded to the server. Plugins seem to be the only
- alternative,
- but they are only activated when the browser comes across an unknown
- mime type.
-
- My idea was to have a page of hypertext links that point to
- non-existant mime
- files so that the plugin would be called. The plugin would show a
- simple file
- browser so the user could find the correct file. The plugin passes the
- file back to
- the browser which forwards it to the server along with info on which
- link was chosen.
-
- Another alternative would be to use a standalone ftp program to send
- the file
- to the server's machine and then have the user use a browser to tell
- the server
- where the file is. The problem with that is that the two activities
- are so loosely
- coupled that there are lots of chances for something to go awry
- (nerver trust a
- user :-)). The wrong file could be crosslinked to an activity, files
- could be sent
- to the server and never linked etc.
-
- Plugins appear to be the cleaner solution, but there's no adequate
- documentation
- on how to write them! How can a plugin know which link was pressed?
- Should the
- file browser be an external program or does Visual C++ have a class I
- can use?
- How can I read the contents of a file and pass it back to the browser?
- How does
- the browser forward the data to the server?
-
- Maybe I should go with an ftp program, but that is so inelegant! Any
- advice or
- documentation on plugins would be most appreciated.
-
- Larry
-
-